<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>分类新增</title>
    <style>
        body, html {
            background: #EEEEEE;
        }

        .content {
            width: calc(100% - 240px);
            height: calc(100% - 190px);
            float: right;
            padding: 20px;
        }

        .top {
            width: calc(100% - 200px);
            height: 50px;
            background: white;
            margin-left: 200px;
            line-height: 50px;
        }
    </style>
</head>
<body>
<%--布局--%>
<jsp:include page="template/layout.jsp"/>
<%--内容--%>
<div class="top">
    <span class="layui-breadcrumb breadcrumb"><a id="breadcrumbTitle">首页</a></span>
</div>
<div class="content">
    <form class="layui-form" action="doCategoryAdd" method="post">

        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" required lay-verify="required" placeholder="请输入用户名" autocomplete="off"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">描述</label>
            <div class="layui-input-block">
                <input type="text" name="desciption" required lay-verify="required" placeholder="请输入用户名" autocomplete="off"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" name="mark" required lay-verify="required" placeholder="请输入用户名" autocomplete="off"
                       class="layui-input">
            </div>
        </div>



        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            // return false;
        });
    });
</script>
</body>
</html>

